package tree;

/**
 * @author justnow
 * Created on 2020-09-24
 * Description
 */
public class SwardOffer54 {
    public int target;
    public int k;
    public int kthLargest(TreeNode root, int k) {
        this.k = k;
        return target;
    }

    public void inOrder(TreeNode root) {
        if (root == null || k == 0) {
            return;
        }
        inOrder(root.left);
        if (--k == 0) target = root.val;
        inOrder(root.right);
    }

}
